package TCP.sever0;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class sever_socket {
    public static void main(String[] args) throws IOException {
        ServerSocket s = new ServerSocket(10002);
        Socket accept = s.accept();
        InputStream Input = accept.getInputStream();
        int b;
        while((b=Input.read())!=-1){
            System.out.print((char)b);
        }
        s.close();
    }
}
